#include <iostream>
#include "mergeLink.hpp"
using namespace std;
int main() {
    Node* node1 = new Node(1);
    Node* node2 = new Node(4);
    Node* node3 = new Node(5);

    Node* node4 = new Node(1);
    Node* node5 = new Node(2);
    Node* node6 = new Node(3);
    Node* node7 = new Node(6);
    node1->next = node2;
    node2->next = node3;

    node4->next = node5;
    node5->next = node6;
    node6->next = node7;
    Node* head = mergeLink(node1,node4);
    while (head){
        cout<<head->value<<" ";
        head = head->next;
    }
    delete node1;
    delete node2;
    delete node3;
    delete node4;
    delete node5;
    delete node6;
    delete node7;
    return 0;
}